
/*
 * @Author: 梁 卓
 * @Version: V1.0.0
 * @Date: 2024-02-02 17:07:16
 * @LastEditors: 梁 卓
 * @LastEditTime: 2024-02-18 16:39:43
 * @FilePath: index.js
 * Copyright 2024 Marvin, All Rights Reserved. 
 * 2024-02-02 17:07:16
 * @Description: 
 */
import Vue from "vue";
import VueRouter from "vue-router";
// import HomeView from "@/views/Home";

Vue.use(VueRouter);

const routes = [
    {
      //首页
      path: '/home',
      component: () => import('@/views/Home'),
    },
    // Vue 路由重定向到Home
    {
      path: '*',
      redirect: 'Home'
    },
    {
      //最新报价
      path: '/price',
      component: () => import('@/views/Price'),
    },
    {
      //价格指数
      path: '/priceIndice',
      component: () => import('@/views/PriceIndice'),
    },
    {
      //价格行情
      path: '/quote',
      component: () => import('@/views/PriceQuote'),
    },
    {
      //分析报告
      path: '/report',
      component: () => import('@/views/Report'),
    },
    {
      //新闻资讯
      path: '/news',
      component: () => import('@/views/News'),
    },
    {
      //新闻资讯
      path: '/market',
      component: () => import('@/views/Market'),
    },
    {
      // 错误页
      path: '/error',
      component: () => import('@/views/error/error'),
      hidden: true
    },

];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
